#!/usr/bin/env ruby
#^syntax detection

version ">= 1.5.1"

node 'vagrant' do

  provider TestLab::Provider::BareMetal

  provisioners  [
    TestLab::Provisioner::Raring,
    TestLab::Provisioner::AptCacherNG,
    TestLab::Provisioner::Bind,
    TestLab::Provisioner::Resolv
  ]

  network 'labnet' do
    provisioners  [
      TestLab::Provisioner::Bind
    ]

    address       '10.128.0.1/16'
    bridge        'br_test'
  end

  container "test-server" do
    distro        "ubuntu"
    release       "precise"

    provisioners   [
      TestLab::Provisioner::Resolv,
      TestLab::Provisioner::AptCacherNG,
      TestLab::Provisioner::Apt
    ]

    user do
      username         'deployer'
      password         'deployer'
      identity         File.join(Dir.pwd, 'spec', 'support', 'test')
      public_identity  File.join(Dir.pwd, 'spec', 'support', 'test.pub')
      uid              2600
      gid              2600
    end

    interface do
      network_id  'labnet'
      name        'eth0'
      address     '10.128.0.254/16'
      mac         '00:00:5e:63:b5:9f'
    end
  end

end
